<?php
/**
 * departments
 * @OA\Schema(
 *       schema="Departments",
 *       description="Departments-部门",
 *       @OA\Property(
 *            property="id",
 *            type="number"
 *       ),
 *      @OA\Property(
 *            property="department_name",
 *            type="string",
 *            description="部门名称"
 *       ),
 *       @OA\Property(
 *            property="parent_id",
 *            type="number",
 *            description="父级ID"
 *      ),
 *      @OA\Property(
 *            property="principal",
 *            type="string",
 *            description="负责人"
 *       ),
 *       @OA\Property(
 *            property="mobile",
 *            type="string",
 *            description="联系电话",
 *       ),
 *     @OA\Property(
 *            property="email",
 *            type="string",
 *            description="联系邮箱",
 *       ),
 *     @OA\Property(
 *            property="creator_id",
 *            type="number",
 *            description="创建人ID",
 *       ),
 *     @OA\Property(
 *            property="status",
 *            type="number",
 *            description="1 正常 2 停用",
 *       ),
 *     @OA\Property(
 *            property="sort",
 *            type="number",
 *            description="排序字段",
 *       ),
 *     @OA\Property(
 *            property="created_at",
 *            type="string",
 *            description="创建时间"
 *       ),
 *     @OA\Property(
 *            property="updated_at",
 *            type="string",
 *            description="更新时间",
 *     ),
 *     @OA\Property(
 *            property="deleted_at",
 *            type="string",
 *            description="删除状态，null 未删除 timestamp 已删除",
 *     ),
 *     @OA\Property(
 *            property="children",
 *            type="array",
 *            @OA\Items(ref="#/components/schemas/Departments")
 *     )
 * )
 *
 * @OA\Get(path="/departments",
 *   tags={"departments"},
 *   summary="部门列表",
 *   operationId="getDepartments",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/pageSize"),
 *   @OA\Parameter(ref="#/components/parameters/current"),
 *   @OA\Parameter(ref="#/components/parameters/keyword"),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/QueryResponse")
 *   )
 * )
 *
 *
 * @OA\Post(path="/departments",
 *   tags={"departments"},
 *   summary="创建部门",
 *   operationId="createDepartments",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\RequestBody(
 *     @OA\MediaType(
 *       mediaType="application/json",
 *         @OA\Schema(ref="#/components/schemas/Departments")
 *       )
 *     ),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 *
 * @OA\Put(path="/departments/{id}",
 *   tags={"departments"},
 *   summary="更新部门",
 *   operationId="updateDepartments",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/id"),
 *   @OA\RequestBody(
 *     @OA\MediaType(
 *       mediaType="application/json",
 *         @OA\Schema(ref="#/components/schemas/Departments")
 *       )
 *     ),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 *
 * @OA\Delete (path="/departments/{id}",
 *   tags={"departments"},
 *   summary="删除部门",
 *   operationId="deleteDepartments",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/id"),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 */